package com.jt.flight.model;

/**
 * since 2015/11/26.
 */
public class Response<T> {

    public final boolean success;
    public final String msg;
    public final String url;
    public final T t;

    public Response(boolean success, String msg, String url, T t) {
        this.success = success;
        this.msg = msg;
        this.url = url;
        this.t = t;
    }

    public static Response fail(String msg) {
        return new Response(false, msg, "", "");
    }

    public static <T> Response<T> success(String url, T t) {
        return new Response<T>(true, "", url, t);
    }
}
